package
{
	public class DistanceObject
	{
		private var _initPos:Number;
		private var _destPos:Number;
		private var _trainStops:Boolean;
		private var _timeStopped:Number;
		private var _segmentVMax:Number;
		
		//estas dos son las velocidades con las que el tren empieza y termina el segmento
		public var trainInitVelocity:Number = 0;
		public var trainFinalVelocity:Number = 0;
		
		public function DistanceObject(init:Number, dest:Number, tStopped:Number, segVMax:Number)
		{
			_initPos = init;
			_destPos = dest;
			_timeStopped = tStopped;
			_segmentVMax = segVMax;
		}

		public function get segmentVMax():Number
		{
			return _segmentVMax;
		}

		public function set segmentVMax(value:Number):void
		{
			_segmentVMax = value;
		}

		public function get timeStopped():Number
		{
			return _timeStopped;
		}

		public function set timeStopped(value:Number):void
		{
			_timeStopped = value;
		}

		public function get trainStops():Boolean
		{
			if (timeStopped > 0)
				return true;
			else 
				return false;
		}

		public function set trainStops(value:Boolean):void
		{
			_trainStops = value;
		}

		public function get destPos():Number
		{
			return _destPos;
		}

		public function set destPos(value:Number):void
		{
			_destPos = value;
		}

		public function get initPos():Number
		{
			return _initPos;
		}

		public function set initPos(value:Number):void
		{
			_initPos = value;
		}

	}
}